package com.ningxun.pagent.bus.service.basewechatuser.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningxun.pagent.bus.domain.wechatuser.UserConversationFavorite;
import com.ningxun.pagent.bus.mapper.UserConversationFavoriteMapper;
import com.ningxun.pagent.bus.service.basewechatuser.IUserConversationFavoriteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户会话收藏表（时间精确到秒） 服务实现类
 * </p>
 *
 * @author han
 * @since 2025-07-28
 */
@Service
public class UserConversationFavoriteServiceImpl extends ServiceImpl<UserConversationFavoriteMapper, UserConversationFavorite> implements IUserConversationFavoriteService {

    @Autowired
    private UserConversationFavoriteMapper userConversationFavoriteMapper;

    /**
     * 查询用户会话收藏
     *
     * @param id 用户会话收藏主键
     * @return 用户会话收藏
     */
    @Override
    public UserConversationFavorite selectUserConversationFavoriteById(Long id)
    {
        return userConversationFavoriteMapper.selectUserConversationFavoriteById(id);
    }

    /**
     * 查询用户会话收藏列表
     *
     * @param userConversationFavorite 用户会话收藏
     * @return 用户会话收藏
     */
    @Override
    public List<UserConversationFavorite> selectUserConversationFavoriteList(UserConversationFavorite userConversationFavorite)
    {
        return userConversationFavoriteMapper.selectUserConversationFavoriteList(userConversationFavorite);
    }

    /**
     * 新增用户会话收藏
     *
     * @param userConversationFavorite 用户会话收藏
     * @return 结果
     */
    @Override
    public int insertUserConversationFavorite(UserConversationFavorite userConversationFavorite)
    {
        return userConversationFavoriteMapper.insertUserConversationFavorite(userConversationFavorite);
    }

    /**
     * 修改用户会话收藏
     *
     * @param userConversationFavorite 用户会话收藏
     * @return 结果
     */
    @Override
    public int updateUserConversationFavorite(UserConversationFavorite userConversationFavorite)
    {
        return userConversationFavoriteMapper.updateUserConversationFavorite(userConversationFavorite);
    }

    /**
     * 批量删除用户会话收藏
     *
     * @param ids 需要删除的用户会话收藏主键
     * @return 结果
     */
    @Override
    public int deleteUserConversationFavoriteByIds(Long[] ids)
    {
        return userConversationFavoriteMapper.deleteUserConversationFavoriteByIds(ids);
    }

    /**
     * 删除用户会话收藏信息
     *
     * @param id 用户会话收藏主键
     * @return 结果
     */
    @Override
    public int deleteUserConversationFavoriteById(Long id)
    {
        return userConversationFavoriteMapper.deleteUserConversationFavoriteById(id);
    }
}
